package com.qfedu.edu.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 设备表
 * </p>
 *
 * @author xiaobobo
 * @since 2024-09-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("qf_device")
@ApiModel(value="Device对象", description="设备表")
public class Device implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "设备名称")
    private String name;

    @ApiModelProperty(value = "设备标识")
    private String deviceKey;

    @ApiModelProperty(value = "设备类型")
    private String deviceTypeId;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "是否删除 ： 0 未删除   1删除")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "所属产品")
    private String productId;

    @ApiModelProperty(value = "父设备")
    private String parentId;

    @ApiModelProperty(value = "租户ID")
    private String tenantId;

    @ApiModelProperty(value = "分组ID")
    private String groupId;

    @ApiModelProperty(value = "设备激活状态:1未激活, 2激活")
    private Integer active;

    @ApiModelProperty(value = "设备认证秘钥")
    private String deviceSecret;

    @ApiModelProperty(value = "设备在关联产品中的唯一编号，同一个产品下的多个设备编号不能重复")
    private Integer deviceIndex;

    @ApiModelProperty(value = "离线乐观锁")
    @Version
    private Integer version;

    @ApiModelProperty("单个设备的价格")
    private BigDecimal price;

    @ApiModelProperty("单个设备需要的数量")
    private Integer count;

}
